const elSwitch = {
    name: 'el-switch',
    bind: {
        activeText: '是',
        inactiveText: '否',
        inlinePrompt: true,
        activeValue: true,
        inactiveValue: false
    }
}

const elInput = {
    name: 'el-input',
    bind: {

    }
}

const elInputNumber = {
    name: 'el-input-number',
    bind: {

    }
}

const labelPosition = {
    name: 'el-radio-group',
    bind: {
        size: 'small'
    },
    children: [{
        name: 'el-radio-button',
        bind: {
            value: 'left',
        },
        content: 'left'
    }, {
        name: 'el-radio-button',
        bind: {
            value: 'right',
        },
        content: 'right'
    }, {
        name: 'el-radio-button',
        bind: {
            value: 'top',
        },
        content: 'top'
    }]
}

const widgetSize = {
    name: 'el-radio-group',
    bind: {
        size: 'small'
    },
    children: [{
        name: 'el-radio-button',
        bind: {
            value: 'large',
        },
        content: 'large'
    }, {
        name: 'el-radio-button',
        bind: {
            value: 'default',
        },
        content: 'default'
    }, {
        name: 'el-radio-button',
        bind: {
            value: 'small',
        },
        content: 'small'
    }]
}

export const formAttributesConfig = {
    labelWidth: {
        label: '标签宽度',
        component: elInput
    },
    labelPosition: {
        label: '标签位置',
        component: labelPosition
    },
    disabled: {
        label: '是否禁用',
        component: elSwitch
    },
    size: {
        label: '组件大小',
        component: widgetSize
    },
    showMessage: {
        label: '是否显示校验错误信息',
        component: elSwitch
    },
    scrollToError: {
        label: '滚动到校验错误位置',
        component: elSwitch
    }
}